import {
	HTTP
} from '../util/http'
class LikeModel extends HTTP {
	like(behavior, artID, category) {
		let url = behavior == 'like' ? 'like' : 'like/cancel'
		this.request({
			url: url,
			method: 'POST',
			data: {
				art_id: artID,
				type: category
			}
		})
	}

	// like更新
	getClassicLikeStatus(type, id, sCallback) {
		this.request({
			url: `classic/${type}/${id}/favor`,
			success: (res) => {
				sCallback(res)
			}
		})
	}
}
export {
	LikeModel
}